<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="css/amazeui.min.css" />
		<link rel="stylesheet" href="css/admin.css" />
	</head>

	<script src="js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript">
		/*
		* 添加活动
		* */
       $(function () {
           $("#tianjia").click(function () {
               $div1 = $('#show');
               if ($div1.is(':hidden')) {
                   $div1.show();
               } else if ($div1.is(':visible')) {
                   $div1.hide();
               }
           })
       })

        /*显示所有商品=================*/
		/*$(window).load(function () {
            window.location.href="/selectAll";
            $.ajax({
                url:"userAction_findMangerByDeptId",//访问的地址
                type:"post",
                data:{"传递到后台的参数名":参数},
                dataType:'text',//后台返回的数据格式类型
                });
        })*/

      /*  $(document).ready(function(){
            window.location.href="/selectAll";
		});*/
    
	</script>




	<body>
		<div class="admin-content-body">
			<div class="am-cf am-padding am-padding-bottom-0">
				<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">活动管理</strong><small></small></div>
			</div>

			<hr>

			<div class="am-g">
				<div class="am-u-sm-12 am-u-md-6">
					<div class="am-btn-toolbar">
						<div class="am-btn-group am-btn-group-xs">
							<button type="button" class="am-btn am-btn-default" id="tianjia"><span class="am-icon-plus"></span> 新增</button>
						</div>
					</div>
				</div>
				<div class="am-u-sm-12 am-u-md-3">

				</div>
				<div class="am-u-sm-12 am-u-md-3">
					<div class="am-input-group am-input-group-sm">
						<input type="text" class="am-form-field">
						<span class="am-input-group-btn">
            <button class="am-btn am-btn-default" type="button">搜索</button>
          </span>
					</div>
				</div>
			</div>

			<!--================================================-->
			<div style="display:none" id="show">
				<form action="/insert" method="post">
					<p><input type="text" name="activityesName">请输入活动名称</p>
					<p><input type="text" name="discount">请输入活动折扣</p>
					<p><input type="submit" value="添加"></p>
				</form>
			</div>
			<!--================================================-->
			<div class="am-g">
				<!--=====================-->
				<div class="am-u-sm-12"  id="refresh">
					<form class="am-form">
						<table class="am-table am-table-striped am-table-hover table-main">
							<thead>
								<tr>
									<th class="table-check"><input type="checkbox"></th>
									<th class="table-id">ID</th>
									<th class="table-title">新闻类别</th>
									<th class="table-set">操作</th>
								</tr>
							</thead>
							<tbody>

                                <!--显示所有活动================================================================-->
								<tr th:each="Activityesarea : ${actityAll}" >
									<td><input type="checkbox"></td>
									<td th:text="${Activityesarea.getActivityesareaid()}"></td>
									<td th:text="${Activityesarea.getActivityesname()}"></td>
									<td th:text="${Activityesarea.getDiscount()}"></td>
									<td>
										<div class="am-btn-toolbar">
											<div class="am-btn-group am-btn-group-xs">
												<button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>
												<button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><a class="am-icon-trash-o" th:href="@{/delect(activityesAreaId=${Activityesarea.getActivityesareaid()})}">删除</a> </button>
											</div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
						<div class="am-cf">
							<span>共有<span th:text="${changdu}"></span>条记录</span>
							<div class="am-fr">
								<ul class="am-pagination">

								</ul>
							</div>
						</div>
						<hr>
					</form>
				</div>

			</div>
		</div>
		
	
	</body>

</html>